package Demo01.Tesk.Demo01;

import java.util.Random;

public class Test {
    public static void main(String[] args) {
        Random r = new Random();
        decToHex(r.nextInt(100) + 1, new NumberToString() {
            @Override
            public String convert(int num) {
                System.out.println("num:"+num);
                return Integer.toHexString(num);
            }
        });
    }
    static void decToHex(int num ,NumberToString nts){
        String number =nts.convert(num);
        System.out.println(number);
    }
}




